<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>点聚合</title>
<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--    <link rel="stylesheet" type="text/css" href="leafletJs/leaflet.css">-->
<!--    <script type="text/javascript" src="leafletJs/leaflet-src.js"></script>-->
<!--    <script type="text/javascript" src="lmjs/leaflet-tilelayer-colorizr.js"></script>-->
<!--    <script type="text/javascript" src="lmjs/setMapStytle.js"></script>-->
<!--    <script type="text/javascript" src="lmjs/mapStyle.js"></script>-->
<!--    <script type="text/javascript" src="lmjs/initMap.js"></script>-->

<!--    <link rel="stylesheet" href="lmcss/screen.css"/>-->
<!--    <link rel="stylesheet" href="lmcss/MarkerCluster.css"/>-->
<!--    <link rel="stylesheet" href="lmcss/MarkerCluster.Default.css"/>-->
<!--    <script src="lmjs/leaflet.markercluster-src.js"></script>-->
<!--    <script src="lmjs/realworld.388.js"></script>-->

    <!--	下面这个是依赖服务器上的js-->
        <script type="text/javascript" src="http://61.145.229.217:6199/js/lmJs/lmBase.js"></script>
    <!--    点聚合功能需要单独引用的js    -->
        <script type="text/javascript" src="http://61.145.229.217:6199/js/lmJs/cluser.js"></script>
    <style>
        /*html,*/
        /*body,*/
        /*#map {*/
        /*    height: 100%;*/
        /*    width: 100%;*/
        /*    !* background-color: rgba(23, 27, 241, 0.1); *!*/
        /*}*/
    </style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
    /* 这块代码是引入地图的,根据自己的项目来就好(我的项目里面是离线地图) */
    // --start引入地图--
    var map = L.initMap('map', { // 以下参数均为可选项
        center: [34.694, 113.587],// 中心点
        zoom: 7,  // 初始化放大级别
        zoomControl: false, // + -号放大缩小
        attributionControl: false, // 右下角leaflet.js图标
        maxZoom: 18,// 显示的最大层级(最高18)
        minZoom: 3 // 显示的小层级
    });
    //将图层加载到地图上，并设置最大的聚焦还有map样式
    var markers = L.markerClusterGroup();
    var tempMarkers = [];
    for (var i = 0; i < addressPoints.length; i++) {
        var a = addressPoints[i];
        var title = a[2];
        var marker = L.marker(new L.LatLng(a[0], a[1]), {title: title});
        marker.bindPopup(title);
        markers.addLayer(marker);
    }
    var ss = markers.getLayers();
    tempMarkers = markers;
    var marker = L.marker(new L.LatLng(a[0], a[1]), {title: title}).bindPopup("title");
    marker.mylove = "哈哈哈哈";
    console.log(marker.getPopup().getContent())
    map.addLayer(markers);
        // map.removeLayer(tempMarkers);
</script>
</body>
</html>